# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: csslayer <wengxt AT gmail com>

pkgname=libime
pkgver=1.0.17
pkgrel=1
pkgdesc="A library to support generic input method implementation"
arch=('loong64' 'x86_64')
url="https://github.com/fcitx/libime"
license=('GPL')
depends=('boost-libs' 'fcitx5')
makedepends=('boost' 'extra-cmake-modules' 'ninja' 'python')
source=("https://download.fcitx-im.org/fcitx5/libime/libime-${pkgver}_dict.tar.xz"{,.sig})
sha512sums=('5017f72bd82447157821d5b49df8d4bafd603890b2b014d6f2be92dbaf145e1ab68211e617dac5f940b2f525c538b28ffd9723106148e9420daff71fc30331df'
            'SKIP')
validpgpkeys=('2CC8A0609AD2A479C65B6D5C8E8B898CBF2412F9') # Weng Xuetian <wengxt@gmail.com>

build(){
  cd $pkgname-$pkgver

  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib .
  ninja
}

check() {
  cd $pkgname-$pkgver
  ninja test
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" ninja install
}
